package com.online.exam.service.impl;


import com.online.exam.dao.GradeInfoMapper;
import com.online.exam.pojo.GradeInfo;
import com.online.exam.service.GradeInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 * <p>Title: GradeInfoServiceImpl</p>
 * <p>Description: 年级信息 Service 实现类</p>
 * @author: luoxingfa
 * @date: 2019-11-1
 * @time: 下午2:16:32
 */
@Service
public class GradeInfoServiceImpl implements GradeInfoService {
    @Autowired
    private GradeInfoMapper gradeInfoMapper;

    public List<GradeInfo> getGrades() {
        return gradeInfoMapper.getGrades();
    }

    @Override
    public GradeInfo getGradeById(int gradeId) {
        return gradeInfoMapper.getGradeByid(gradeId);
    }


    public int isAddGrade(GradeInfo grade) {
        return gradeInfoMapper.isAddGrade(grade);
    }

    @Override
    public int isDelGrade(int gradeId) {
        return gradeInfoMapper.isDelGrade(gradeId);
    }

    @Override
    public int isUpdateGrade(GradeInfo grade) {
        return gradeInfoMapper.isUpdate(grade);
    }

}
